(lambda wrap-js (bundle app cb)
  (.read-file (require "fs")
    (.resolve (require "path") __dirname ".." "browser" "boot.js")
    "utf-8"
    (lambda (err code)
      (if err (throw err))
      (replace "%REQUIRE%" bundle)
      (replace "%DEPS%" (JSON.stringify app.deps.deps))
      (replace "%ICE%" (JSON.stringify app.ice))
      (replace "%FORMATS%" (./formats app.formats))
      (cb code)
      (function replace (key val) (= code (code.replace key (./just val)))))))
